<?php
class IndexAction extends BaseAction{
    /**
     * 首页入口
     */
    public function index(){

        $category_list = $this->getCategoryOrderByCid();

        $this->assign("category_list", $category_list);
        $this->display();
    }

    /**
     * 获取分类信息按cid排序
     * @return mixed
     * @data 2013-06-13
     * @author zhouyang
     */
    private function getCategoryOrderByCid(){
        $Category = M('Category');

        $category_list = $Category->where('pid=0')->order('cid')->select();

        return $category_list;
    }
}